import React from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Types } from 'phaser';

import GameWrapper from '@/components/GameWrapper';
import DemoSence from '@/pages/game/demo/scenes';
import DemoMainScene from '@/pages/game/demo/scenes/main';

const config: Types.Core.GameConfig = {
  width: 800,
  height: 600,
  physics: {
    default: 'arcade',
    arcade: { gravity: { y: 300 }, debug: false },
  },
  scene: [DemoSence, DemoMainScene],
};

const DemoGame: React.FC<{}> = () => {
  return (
    <PageHeaderWrapper>
      <GameWrapper config={config} />
    </PageHeaderWrapper>
  );
};

export default DemoGame;
